<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Datagrid aligning columns</title>

    <link rel="stylesheet" type="text/css" href="/easyui.css">
    <link rel="stylesheet" type="text/css" href="/icon.css">
    <link rel="stylesheet" type="text/css" href="/demo.css">
    <script src="/jquery.min.js"></script>
    <script src="/jquery.easyui.min.js"></script>
</head>
<body>
<table  id="tb" title="Aligning Columns in DataGrid" style="width:410px;height:250px">
    <thead>
    <tr>
        <th  data-options="field:'itemid',width:80,halign:'center'" >编码</th>
        <th  data-options="field:'listprice',width:80,align:'right',halign:'center'">名称</th>
        <th data-options="field:'attr1',width:250,halign:'center'">价格</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>001</td><td>名称1</td><td>2323</td>
    </tr>
    <tr>
        <td>002</td><td>名称2</td><td>4612</td>
    </tr>
    <tr>
        <td>002</td><td>名称2</td><td>4612</td>
    </tr>
    <tr>
        <td>002</td><td>名称2</td><td>4612</td>
    </tr>
    </tbody>
</table>
<!--<table class="easyui-datagrid" title="Aligning Columns in DataGrid" style="width:700px;height:250px"-->
       <!--data-options="singleSelect:true,collapsible:true,url:'datagrid_data1.json',method:'get'">-->
    <!--<thead>-->
    <!--<tr>-->
        <!--<th data-options="field:'itemid',width:80,halign:'center'">Item ID</th>-->
        <!--<th data-options="field:'productid',width:100,halign:'center'">Product</th>-->
        <!--<th data-options="field:'listprice',width:80,align:'right',halign:'center'">List Price</th>-->
        <!--<th data-options="field:'unitcost',width:80,align:'right',halign:'center'">Unit Cost</th>-->
        <!--<th data-options="field:'attr1',width:250,halign:'center'">Attribute</th>-->
        <!--<th data-options="field:'status',width:60,align:'center',halign:'center'">Status</th>-->
    <!--</tr>-->
    <!--</thead>-->
<!--</table>-->
<script type="text/javascript">
    $("#tb").datagrid({});
</script>



</body>
</html>